<!--
Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<link rel="import" href="../ct-builder.html">

<script>
(function () {

var assert = chai.assert;

describe('ct-builder', function() {
  describe('default builder UI', function() {
    it('should link to builder', function(done) {
      var masterUrl = 'https://url';
      var builderName = 'WebKit Linux (dbg)';

      var builder = document.createElement('ct-builder');
      builder.builder = new CTBuilder(masterUrl, builderName, 1);

      setTimeout(function() {
        var a = builder.shadowRoot.querySelector('a');
        assert.ok(a);
        assert(a.href.startsWith(masterUrl));
        assert.include(a.href, encodeURIComponent(builderName));

        done();
      });
    });
  });
});

})()
</script>
